Skip to content

fix(git): make the commit panel change list a tree and wrap the log filter bar - #377

Open
Exeloo wants to merge 4 commits into
mainfrom
fix/git-plugin-a11y
Open

Exeloo wants to merge 4 commits into
mainfrom
fix/git-plugin-a11y

Conversation

@Exeloo

@Exeloo Exeloo commented Nov 29, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Closes #325
Closes #321

#325: the Commit panel's change list is a tree. Its checkboxes and the Mark resolved button sat inside button and option roles, which may not hold controls. The keyboard model was already a tree (group stops, Left/Right to fold, an active descendant), and a treeitem may hold controls:

before: div[role=group] > section > div[role=button] (group) + ul[role=listbox] > li[role=option] (file)
after:  div[role=tree][aria-multiselectable] > div[role=treeitem][aria-expanded] (group)
                                               > ul[role=group] > li[role=treeitem] (file)
  • The include-all checkbox of a group is no longer aria-hidden, so its state is a real checkbox. The fold button's duplicate aria-expanded is gone.
  • Mark resolved is named per row (Mark resolved: <path>).
  • The keyboard cursor stays drawn and named: when the cursor row is folded away or past the row limit, the cursor and aria-activedescendant fall back to its group. The row or group at the cursor is outlined with the focus colour while the tree has the focus. Moving onto a group scrolls its header into view.
  • changes-keys.ts and the row ids are unchanged.

#321: the Git log filter bar wraps instead of overflowing at 1280x720. In CommitTable.svelte, .filters wraps (2px between rows, 4px between controls), the search field keeps at least 140px, and the User and Date selects keep their natural width (the kit trigger's width: 100% is overridden there, so packages/ui is untouched).

How do you test this PR?

  • Commit panel change list nests controls in button and option roles #325, before (main): a nestedControls(page) helper in git.spec.ts lists every control inside a button, [role=button], [role=option] or [role=checkbox]. It found 48 in the keyboard test and 8 in the conflict test. After: [] in both.

  • Commit panel change list nests controls in button and option roles #325, cursor round (6e414cd), each red on the old build and green after:

    Check Before
    Per-row Mark resolved name no button named Mark resolved: scratch/rename-me.txt
    Cursor outline Expected: "solid", Received: "none"
    Group header in view after 45×ArrowDown, then ArrowLeft toBeInViewport failed, ratio 0
    aria-activedescendant after Collapse all pointed at a row that isn't drawn

    The last two reds came from a temporary expect.soft copy of the keyboard test, since that test stops at its first failure.

  • Git log filter bar overflows at 1280x720 #321, before: fits the log filter bar in a 1280x720 window gave overflow: 140, outside: ["User","Date"], wrapped: ["User","Date"]. After 81ca1d7: it also checks that User and Date are each narrower than half the bar and that the bar takes at most 3 rows. Red at the previous CSS ("wide": ["User", "Date"]), then green.

  • Final commit: git.spec.ts and tutorial.spec.ts with the engine and CLI (Chromium): 12 passed, 0 skipped, 0 failed. The include-all lookups no longer pass includeHidden, so the tutorial run proves the checkbox is exposed. pnpm build and pnpm lint pass.

  • plugins/git pnpm test:unit (17 passed) and pnpm typecheck last ran at 6e414cd; 81ca1d7 changes only CSS and the e2e spec.

  • Manual check: open the Git panel at 1280x720; in the Commit panel, use the arrow keys, Left/Right and Space on the change list.

Merge danger

  • Door: two-way. A revert is enough.
  • Blast radius: the git built-in plugin and its e2e only. No public API change. The editor app deploys on merge (ADR 0006).
  • Git log filter bar overflows at 1280x720 #321 layout: the filter bar fits in at most 3 rows. In the default layout at 1280x720 the commits column is about 181px wide, because the details column keeps a 220px minimum. A 2-row bar would need a change to the LogView.svelte grid, which narrows the branch tree and the details column. That call is for the team.
  • Integration proof: a scratch branch with every editor branch of this sweep merged passed pnpm build, lint, typecheck, pnpm test --force (1014 passed, 1 skipped) and the full e2e suite with the engine (141/141, Chromium only).

Follow-up issues

Quality gate

Check Result HEAD Notes
Docs N/A 49cc0ed Roles, focus and layout only: no command, setting or documented screen changed
Correctness Findings fixed, not re-reviewed 49cc0ed I1 (selects take a full row each) fixed in 81ca1d7; I2 (group header off-screen on navigation) fixed in 6e414cd. Producer red→green only
Performance No separate review recorded
Accessibility Findings fixed, not re-reviewed 49cc0ed I1 (stale aria-activedescendant after a fold) and I2 (no visible cursor) plus the minors fixed in 6e414cd. Producer red→green only
Security No separate review recorded
Style Checked in the correctness review 49cc0ed No separate verdict recorded. lint: pass at 81ca1d7 (producer)

The change list was a listbox whose options held checkboxes and a
Mark resolved button, under group headers with role button that held
the fold button and the include-all checkbox: controls nested in roles
whose children are presentational (axe nested-interactive). It is now
a tree: group nodes and files are treeitems, which may hold controls,
and the include-all checkbox is no longer hidden. The keys are the
same.

Closes #325
At 1280x720 the filter bar overflowed its column by 140 px and the
User and Date selects wrapped their labels. The bar now wraps, the
select labels stay on one line, and the search field keeps 140 px.

Closes #321
The group's id moved to its whole treeitem, so moving to a long group
scrolled the group instead of its header, which could stay hidden. A
fold, Collapse all or a file past MAX_ROWS left aria-activedescendant
on an element that is not drawn: the cursor now falls back to the
group node, as Left does. The row at the cursor gets a focus outline
while the tree has the focus, Mark resolved is named per row, and the
hidden chevron loses its unused label.

Refs #325
The kit gives select triggers width: 100%, so once the filter bar
wraps, each select took a whole line. They now keep their natural
width, and the bar's column gap is 4 px. In the default 1280x720
layout the commits column is about 181 px wide: the input, the branch
and the two selects can't fit in 2 rows there, and now take 3.

Refs #321
@Exeloo
Exeloo requested a review from Tchips46 as a code owner November 29, 2026 11:14
@github-actions github-actions Bot added apps:editor Related to Editor app plugins:git Related to Git plugin labels Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps:editor Related to Editor app plugins:git Related to Git plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Commit panel change list nests controls in button and option roles Git log filter bar overflows at 1280x720

1 participant